package First;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        GeometricObject geometricObject = new GeometricObject();
        System.out.println(geometricObject.getColor());
        geometricObject.setColor("yellow");
        System.out.println(geometricObject.isFilled());
        geometricObject.setFilled(true);
        System.out.println(geometricObject.toString());

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入圆的半径");
        double radius = scanner.nextDouble();
        Circle circle = new Circle(radius);
        System.out.println(circle.getArea());
        System.out.println(circle.getPerimeter());

        System.out.println("请输入矩形的长");
        double width = scanner.nextDouble();
        System.out.println("请输入矩形的宽");
        double height = scanner.nextDouble();
        Rectangle rectangle = new Rectangle(width,height);
        System.out.println(rectangle.getArea());
    }
}
